package it.unibo.convoycruisecontrol.simulation;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;

import it.unibo.contact.boatSubSystem.BoatSubSystemLauncher;

public class MainChief 
{
	private static BoatSubSystemLauncher launcher = new SimulatorChiefLauncher();

	public static void main(String[] args) 
	{
		int boatNumber = -1;
		String xmlFilePath = "res/convoy-android.xml";
		try 
		{
			System.out.print("Inserisci il numero della boat: ");
			BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
			boatNumber = Integer.parseInt(in.readLine());
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}

		if(boatNumber != -1)
		{
			launcher.initConvoyInformations(new File(xmlFilePath), boatNumber);
			launcher.doJob();
		}
	}

}
